class AddTableToRelateVisitorsEvents < ActiveRecord::Migration
  def self.up
    change_table :visitors do |t|
      t.remove :event_id
    end
    create_table :events_visitors do |t|
      t.references :visitors
      t.references :events
    end
  end

  def self.down
    drop_table :events_visitors
    change_table :visitors do |t|
      t.references :event_id
    end
  end
end
